package edu.pku.sei.mte.transformation.qvt;

import edu.pku.sei.mte.constants.SearchResult;
import edu.pku.sei.mte.mtemodel.mtmodel.rulebased.Relation;
import edu.pku.sei.mte.runtime.rulebased.RBTEnvironment;

public class QVTCheckAllVisitor extends QVTSemanticVisitor {

	public QVTCheckAllVisitor(RBTEnvironment env) {
		super(env);
	}

	@Override
	public Object visitRelation(Relation e) throws Exception {
		SearchResult result = getSemantic().findContext(e, getContextStack().peek(), null, null, true);
		return result == SearchResult.ALL_SATISFIED;
	}
}
